#pragma once
#include <windows.h>

namespace _FOGGE_
{
	namespace _THREAD_
	{

		class ThreadSafer
		{
		public:
			ThreadSafer();
			virtual ~ThreadSafer();

			CRITICAL_SECTION m_cs;

			static bool m_bUsingThread;
		};

		class Lock
		{
			CRITICAL_SECTION* m_cs;

		public:
			Lock( CRITICAL_SECTION* cs );
			~Lock();
		};

		class ThreadBlocker
		{
			CRITICAL_SECTION* m_cs;

		public:
			ThreadBlocker();
			~ThreadBlocker();

			void Block(CRITICAL_SECTION* cs );
			void Unblock();
		};

	}
}
